﻿namespace FolderCompare.ViewModels;

public class WinSettingsViewModel : WinSettingsBaseViewModel
{
    private readonly IAppSettings _settings;
    public string TextFileTypes { get; set; } = default!;

    public WinSettingsViewModel(IAppSettings settings)
    {
        _settings = settings;

        base.LoadInfo(settings, SettingsMode.默认);

        ObjectHelper.DeepCopy(_settings, this);
    }

    public override void OnSubmit()
    {
        ObjectHelper.DeepCopy(this, _settings);
        ApplicationBase.GetActiveWindow().DialogResult = true;
    }
}